<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>定位</title>
    <style>
        div{
            background-color: #000;
            width: 120px;
            height: 120px;
            color: white;

            /* 相对定位 */
            position: relative;
        }

        .c2{
            left: 240px;
            top:-120px;
        }

        .c4{
            left: 120px;
            top:-240px;
        }

        .c5{
            left: 240px;
            top:-240px;
        }
    </style>
</head>
<body>
    <div class="c1">
        1
    </div>
    <div class="c2">
        2
    </div>
    <div class="c3">
        3
    </div>
    <div class="c4">
        4
    </div>
    <div class="c5">
        5
    </div>
</body>
</html>